//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.baidu.trace;

import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import com.baidu.trace.api.fence.DeleteFenceRequest;
import com.baidu.trace.api.fence.OnFenceListener;

final class ad implements Runnable {
    ad(Context var1, Handler var2, DeleteFenceRequest var3, OnFenceListener var4, IService var5) {
        this.a = var1;
        this.b = var2;
        this.c = var3;
        this.d = var4;
        this.e = var5;
        super();
    }

    public final void run() {
        StringBuffer var1 = new StringBuffer();
        boolean var2 = a.a(this.a, this.b, this.c, var1, this.d);
        if(this.e != null && (null == this.c.getFenceIds() || !TextUtils.isEmpty(var1.toString()))) {
            try {
                if(null == this.c.getFenceIds()) {
                    if(var2) {
                        this.e.handleLocalFence(3, 0L, (String)null);
                    }

                    return;
                }

                this.e.handleLocalFence(2, 0L, var1.substring(0, var1.length() - 1));
            } catch (Exception var3) {
                ;
            }

        }
    }
}
